<?php
/** 
 * Generic_model
 * This class handles general model operations not specific to one table  
 * 
 * @author Ray Nowell
 *	
 */ 
class Generic_model extends MY_Model {

	function Generic_model()
	{
		parent::MY_Model();
	}
	
	/*
	 * Gets the modified date from the specified table 
	 * 
	 */
	function get_modified_date($table_name, $id_field, $table_id)
	{
		define("FIRST_ROW", 3);
		$this->db->flush_cache();
		$this->db->select('modified_date');
		$query 		=	$this->db->get_where($table_name, array($id_field => $table_id),FIRST_ROW);
		$record_row	=	$query->row();
		
		return $record_row->modified_date;
	}

}
/* End of file generic_model.php */
/* Location: ./system/application/models/generic_model.php */